package org.umss.fixturebuilder.model.appengine;

import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Index;
import com.googlecode.objectify.annotation.Parent;

/**
 *
 * @author Daniela Meneses
 */
@Entity
public class TeamModel {

    @Id
    private Long id;
    @Index
    private String name;
    @Parent
    private Key<ChampionshipModel> championship;

    public TeamModel() {
    }

    public TeamModel(String teamName, Key<ChampionshipModel> championship) {
        this.name = teamName;
        this.championship = championship;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Key<ChampionshipModel> getChampionship() {
        return championship;
    }

    public void setChampionship(Key<ChampionshipModel> championship) {
        this.championship = championship;
    }

    @Override
    public String toString() {
        return "TeamModel{" + "id=" + id + ", name=" + name + ", championship=" + championship + '}';
    }
}
